Skip to content

feat: API Gateway emulator HTTP proxy so non-Lambda backends share the emulator origin - #2569

Merged
normj merged 3 commits into
aws:masterfrom
msmourao:feature/api-gateway-emulator-http-integration
Sep 17, 2026
Merged

normj merged 3 commits into
aws:masterfrom
msmourao:feature/api-gateway-emulator-http-integration

Conversation

@msmourao

Copy link
Copy Markdown
Contributor

Issue #, if available:
Closes #2568

Description of changes:
Adds an optional HTTP proxy integration to the Lambda Test Tool v2 API Gateway emulator so non-Lambda HTTP backends can share the same emulator origin as Lambda routes.

Behavior

  • ApiGatewayRouteConfig.IntegrationType:
    • Lambda / omitted (default) — existing event translation → Runtime API
    • Http — reverse-proxy the incoming HTTP request to Endpoint (no API Gateway JSON event wrapping)
  • Validates that Http routes have a non-empty absolute http(s) Endpoint
  • Registers IHttpClientFactory for the proxy path

Why

API Gateway supports HTTP integrations, not only Lambda. Local mixed topologies (Kestrel / containers / App Runner behind the same gateway URL the frontend already uses) need the emulator to represent that.

Tests

Unit tests for accepting valid Http configs and rejecting missing/invalid endpoints.

Out of scope

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…ends

Add optional IntegrationType=Http so emulator routes can reverse-proxy to an HTTP Endpoint instead of invoking Lambda, keeping a single emulator origin for mixed local topologies.

Closes aws#2568

Co-authored-by: Cursor <cursoragent@cursor.com>
@msmourao
msmourao requested review from a team as code owners September 10, 2026 19:09

@normj normj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool feature! Thanks for the contribution. I pushed a commit to your branch updating the README.md.

/// <summary>
/// The integration type: "Lambda" (default) or "Http". When "Http", the request is proxied to the Endpoint URL instead of invoking a Lambda.
/// </summary>
public string? IntegrationType { get; set; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to not use an enum so the values are automatically known outside of the comment? Easier to match values / not make coding mistakes in the future.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I just changed it

Address review feedback on PR aws#2569: replace string IntegrationType with
an enum (Lambda | Http), serialized as strings via JsonStringEnumConverter
so existing route-config JSON and Aspire env vars keep working.

Co-authored-by: Cursor <cursoragent@cursor.com>
@msmourao

Copy link
Copy Markdown
Contributor Author

Addressed @boblodgett's feedback: \IntegrationType\ is now \ApiGatewayIntegrationType\ (\Lambda\ | \Http), with \JsonStringEnumConverter\ so route-config JSON still uses "Http" / "Lambda" strings.

@normj
normj merged commit 94fea8a into aws:master Sep 17, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API Gateway emulator: HTTP proxy integration so non-Lambda backends share the emulator origin

3 participants